Skip to content

Report coverage to Coveralls on pull requests using GITHUB_TOKEN - #109

Merged
dblock merged 1 commit into
masterfrom
dblock/coveralls-github-token
Aug 25, 2026
Merged

Report coverage to Coveralls on pull requests using GITHUB_TOKEN#109
dblock merged 1 commit into
masterfrom
dblock/coveralls-github-token

Conversation

@dblock

@dblock dblock commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Description

The Coverage workflow only triggers on: [push] and uses coveralls_reborn with a COVERALLS_REPO_TOKEN secret. This means it never runs on pull requests, and even if it did, PRs from forks don't have access to that secret, so coverage is never reported to Coveralls or shown as a PR check. Reporting from a single dedicated Ruby version also undercounts real coverage relative to the full test matrix.

  • Switch from coveralls_reborn to the official coverallsapp/github-action, authenticated with the default GITHUB_TOKEN (available on every workflow run, including from fork PRs — no extra secret to configure).
  • Switch the SimpleCov formatter from coveralls_reborn's to simplecov-lcov, since coverallsapp/github-action consumes an lcov report.
  • Report coverage from every job in the test matrix (one per Ruby/JRuby version) as a parallel Coveralls build, and add a coverage-finished job that closes the parallel build after all test jobs complete, so Coveralls merges the per-job lcov reports into a single aggregate coverage number.
  • Remove the now-redundant single-Ruby coverage.yml workflow, folding reporting into test.yml (which already triggers on pull_request).

Once this merges, the COVERALLS_REPO_TOKEN repo secret can be removed since it's no longer used.

Verified locally: bundle exec rubocop reports no offenses; 345 examples, 0 failures, 100% line coverage with an lcov report generated.

The Coverage workflow only triggered on: [push] and used
coveralls_reborn with a COVERALLS_REPO_TOKEN secret, so it never ran
on pull requests, and PRs from forks wouldn't have access to that
secret anyway, meaning coverage was never reported to Coveralls or
shown as a PR check. Reporting from a single dedicated Ruby version
also undercounts real coverage relative to the full test matrix.

- Switch from coveralls_reborn to the official
  coverallsapp/github-action, authenticated with the default
  GITHUB_TOKEN (available on every workflow run, including from fork
  PRs, no extra secret to configure).
- Switch the SimpleCov formatter from coveralls_reborn's to
  simplecov-lcov, since coverallsapp/github-action consumes an lcov
  report.
- Report coverage from every job in the test matrix (one per
  Ruby/JRuby version) as a parallel Coveralls build, and add a
  coverage-finished job that closes the parallel build after all test
  jobs complete, so Coveralls merges the per-job lcov reports into a
  single aggregate coverage number.
- Remove the now-redundant single-Ruby coverage.yml workflow, folding
  reporting into test.yml (which already triggers on pull_request).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Danger Report

No issues found.

View run

@dblock
dblock merged commit d2a8b22 into master Aug 25, 2026
21 checks passed
@dblock
dblock deleted the dblock/coveralls-github-token branch August 25, 2026 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant